﻿Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'DlistDataSet.list' table. You can move, or remove it, as needed.
        Me.listTableAdapter.Fill(Me.DlistDataSet.list)
    End Sub

    Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
        Me.listTableAdapter.Fill(Me.DlistDataSet.list)
    End Sub

    Private Sub btnButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnButton1.Click
        rslinks = 0
        mulinks = 0
        txtTextBox1.Text = ""
        For Each Row As System.Windows.Forms.DataGridViewRow In dataGridView1.Rows
            txtTextBox1.Text += Row.Cells(0).Value.ToString & vbCrLf
            CheckLinks(Row.Cells(0).Value.ToString)
        Next Row
        MessageBox.Show("No of RS links = " & rslinks & vbCrLf & "No of MU links = " & mulinks)
    End Sub
    Dim rslinks As Integer = 0
    Dim mulinks As Integer = 0
    Private Sub CheckLinks(ByVal url As String)
        If url.Contains("rapidshare.com/files/") = True Then
            rslinks += 1
        End If
        If url.Contains("megaupload.com/?d=") = True Then
            mulinks += 1
        End If
    End Sub

    Private Sub DlistDataSetBindingSource_CurrentChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DlistDataSetBindingSource.CurrentChanged

    End Sub

    Private Sub ListBindingSource_CurrentChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBindingSource.CurrentChanged

    End Sub
End Class
